
import wsgiref.handlers
import re
import os

from google.appengine.api import users
from google.appengine.ext import webapp
from layeredcontent import handler



def main():
  application = webapp.WSGIApplication([
    ('/lc/?$', handler.MainHandler),
    ('/lc/login|/lc/logout', handler.UserHandler),
    ('/lc/pages/?.*', handler.PageHandler),
    ('/lc/resources/?.*', handler.ResourceHandler),
    ('/lc/templates/?.*', handler.TemplateHandler),
    ('/lc/.*', handler.RequestHandler),
    ('/.*', handler.ResourceHandler),
  ], debug=True)
  wsgiref.handlers.CGIHandler().run(application)


if __name__ == '__main__':
  main()
